@media (max-width: 400px) {
    .text-right {
        font-size: 30px;
        line-height: 35px;
        text-align: left;
        max-width: 90%;
    }

    footer span {
        font-size: 18px;
    }
}

@media (min-width: 480px) {
    #logo-sidebar {
        width: 300px;
        height: auto;
    }
}

@media (min-width: 401px) and (max-width: 768px) {
    .text-right {
        font-size: 40px;
        line-height: 45px;
        text-align: left;
        max-width: 90%;
    }

    footer span {
        font-size: 25px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        transform: translateY(-100%);
        border: none;
        z-index: 100;
    }

    .sidebar.open {
        transform: translateY(0);
    }

    .menu-icon {
        display: block;
    }

    #square2 {
        display: block;
    }

    nav ul {
        margin-top: 0;
    }

    .contact {
        border-bottom: 1px solid #4E5053;
        border-top: 1px solid #4E5053;
    }

    .content {
        display: flex;
        flex-direction: column;
        gap: 20px;
        margin-left: 0;
    }

    .projetos {
        display: flex;
        padding: 0px;
        gap: 2em;
        flex-wrap: wrap;
        border-bottom: 1px solid #4E5053;
    }

    .projeto {
        display: flex;
        flex-direction: column;
        width: 100%;
        border-bottom: 1px solid #4E5053;
        padding-bottom: 20px;
    }

    .projeto span {
        padding: 0 20px;
    }

    .projeto img {
        width: 30em;
        display: block;
        margin: 0 auto;
    }

    #titulo {
        font-size: 30px;
    }

    #num {
        font-size: 18px;
        margin-left: 0px;
    }

    #p {
        max-width: none;
        font-size: 14px;
    }

    footer {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 10px;
    }

    footer span {
        text-align: center;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .text-right {
        font-size: 40px;
        line-height: 50px;
    }

    .projetos {
        display: flex;
        padding: 0px;
        gap: 2em;
        flex-wrap: wrap;
        border-bottom: 1px solid #4E5053;
        justify-content: center;
        align-items: center;
        margin-top: 20px;
    }

    .projeto {
        display: flex;
        flex-direction: column;
        width: 100%;
        border-bottom: 1px solid #4E5053;
        padding-bottom: 20px;
    }

    .projeto img {
        max-width: 25em;
        display: block;
        margin: 0 auto;
    }

    .projeto span {
        padding: 0 20px;
    }

    #titulo {
        font-size: 24px;
    }

    #num {
        font-size: 14px;
        bottom: 8px;
    }

    #p {
        max-width: none;
        font-size: 15px;
        line-height: 20px;
    }

    footer {
        align-items: center;
    }
}

@media (min-width: 1025px) and (max-width: 1440px) {
    .text-right {
        font-size: 55px;
        line-height: 70px;
    }

    .projetos {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (min-width: 1921px) {
    .projeto img {
        width: 100%;
        max-width: 28em;
    }

    #titulo {
        font-size: 32px;
    }

    #num {
        font-size: 18px;
    }

    #p {
        max-width: 30em;
        font-size: 15px;
    }
}